package com.zero.guava.samples.EventBus;

import com.google.common.eventbus.Subscribe;

/**
 * 不同类型参数的Subscribe
 */
public class MultipleEventListeners {

    @Subscribe
    public void task1(final String event){
        System.out.println("Received event [{"+event+"}] and will take a action by ==task1==");
    }

    @Subscribe
    public void task2(final String event){
        System.out.println("Received event [{"+event+"}] and will take a action by ==task2==");
    }

    @Subscribe
    public void intTask(final Integer event){
        System.out.println("Received event [{"+event+"}] and will take a action by ==intTask==");
    }

}
